package collector

import (
	"gitee.com/csingo/cRpc"
	"github.com/gin-gonic/gin"
)

type PackagesServiceHTTPClient struct{}

func (i *PackagesServiceHTTPClient) RpcClientName() (app string, service string) {
	return "collector", "PackagesService"
}

func (i *PackagesServiceHTTPClient) Add(ctx *gin.Context, req *PackagesServiceAddReq) (rsp *PackagesServiceAddRsp, err error) {
	rsp = &PackagesServiceAddRsp{}
	err = cRpc.Call(ctx, i, "Add", req, rsp)
	return
}

func (i *PackagesServiceHTTPClient) Del(ctx *gin.Context, req *PackagesServiceDelReq) (rsp *PackagesServiceDelRsp, err error) {
	rsp = &PackagesServiceDelRsp{}
	err = cRpc.Call(ctx, i, "Del", req, rsp)
	return
}

func (i *PackagesServiceHTTPClient) AllByInclude(ctx *gin.Context, req *PackagesServiceAllByIncludeReq) (rsp *PackagesServiceAllByIncludeRsp, err error) {
	rsp = &PackagesServiceAllByIncludeRsp{}
	err = cRpc.Call(ctx, i, "AllByInclude", req, rsp)
	return
}
